<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>播放特效案例</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    li {
      list-style: none;
    }
    img {
      width: 100%;
    }
    .box {
      width: 249px;
      height: 210px;
      margin: 50px auto;     
    }
    .box p {
      color: #3b3b3b;
      padding: 10px 10px 0 10px;
    }

    /* 1. 摆放播放按钮: 图片区域的中间 */
    .pic {
      position: relative;
      overflow: hidden;
    }
    .pic::after {
      position: absolute;
      left: 50%;
      top: 50%;
      /* margin-left: -29px;
      margin-top: -29px;
      transform: scale(5); */
      transform: translate(-50%, -50%) scale(5);
      content: '';
      width: 58px;
      height: 58px;
      background-image: url('./images/play.png');
      opacity: 0;
      transition: all .5s;
    }
    /* 2. hover效果: 默认是大按钮且看不见(透明度为0), 鼠标移动到盒子上,显示小按钮且看得见(透明度为1) */
    .box li:hover .pic::after {
      /* transform: scale(1); */
      transform: translate(-50%, -50%) scale(1);
      opacity: 1;
    }
  </style>
</head>
<body>
  <div class="box">
    <ul>
      <li>
        <div class="pic">
          <img src="./images/party.jpeg" alt="">
        </div>
        <p>【和平精英】“初火”音乐概念片：四圣觉醒......</p>
      </li>
    </ul>
  </div>
</body>
</html>